<template>
	<div class="">

		<div class="zzc" v-if="showzzc" @click="close"></div>
		<div class="container">
			<div class="title">巡检单元</div>
			<div class="search_box flb">
				<div class="search_box" style="flex-wrap: wrap;">

					<input type="text" autocomplete="off" v-model="name" class="form-control search_inp"
						placeholder="输入巡检单元名称">

					<el-select v-model="zcvalue" placeholder="巡检类型" @change="page=1">
						<el-option v-for="item in zctype" :key="item.id" :label="item.name" :value="item.id">
						</el-option>
					</el-select>


					<!-- <el-select v-model="zcvalue2" placeholder="巡检周期" @change="page=1">
						<el-option v-for="item in zctype2" :key="item.id" :label="item.name" :value="item.id">
						</el-option>
					</el-select> -->

					<div class="input-cont" style="margin-left:10px;width: 150px;margin-bottom: 20px;">
						<input type="text" class="form-control" readonly v-model="departname" placeholder="所属科室">

						<img src="@assets/images/close.png" class="clears" alt="" v-if="departname"
							@click="departname = '';departId=''">
						<span class="iconfont icon-list" data-toggle="modal" data-target="#keshi"
							@click="utype='search';alert_show2=!alert_show2;"></span>
					</div>

					<el-select v-model="zctypevalue" placeholder="巡检状态" @change="page=1">
						<el-option v-for="item in zctypelist" :key="item.id" :label="item.name" :value="item.id">
						</el-option>
					</el-select>

					<div class="sea_btn sear_btns" @click="search()" style="margin-bottom: 20px;">
						<img src="@assets/images/search.png" alt="">
						查询
					</div>

					<div class="add_btn sear_btns" style="margin-bottom: 20px;" @click="openadd"
						v-if="$permissions.indexOf(214)  != -1">
						<img src="@assets/images/add.png" alt="">
						新增
					</div>
					<div class="del_btn sear_btns" style="margin-bottom: 20px;" @click="delopen(0)"
						v-if="$permissions.indexOf(220)  != -1">
						<img src="@assets/images/del.png" alt="">
						删除
					</div>
				</div>
				<div class="search_box" style="flex-wrap: wrap;">
					<div class="down_btn sear_btns" v-if="$permissions.indexOf(218)  != -1" @click="inspection(0)"
						style="margin-bottom: 20px;">
						<span class="iconfont icon-xunjian" style="margin-right: 5px;"></span>
						批量巡检设置
					</div>
				</div>
			</div>
			<div class="table-responsive">
				<h2 class="tcent" v-if="list.length ==0">暂时没有数据</h2>
				<table class="table table-hover" v-else>
					<tr>
						<th style="width: 50px;">
							<input type="checkbox" autocomplete="off" @change="changeall" v-model="choseall"
								name="zctype" id="zctype"><label for="zctype"></label>
						</th>
						<th>名称</th>
						<th>巡检类型</th>
						<th>详细地点</th>
						<th>所属科室</th>
						<!-- <th>巡检周期</th> -->
						<th>最近巡检</th>
						<th>状态</th>
						<th class="tcent" v-if="$permissions.indexOf(218)  != -1 || $permissions.indexOf(264)  != -1">
							操作
						</th>
					</tr>
					<tr v-for="item,index in list">
						<td style="width: 50px;">
							<input type="checkbox" v-model="item.chosesf" @change="chosechange" name="zctype"
								:id="'zctype'+item.id"><label :for="'zctype'+item.id"></label>
						</td>
						<td>{{item.name}}</td>
						<td>{{item.typeName}}</td>
						<td>{{item.address}}</td>
						<td>{{item.maintenanceDepart}}</td>
						<!-- <td>{{item.periodName}}</td> -->
						<td>{{item.lastTimeXjDate}}</td>
						<td>{{item.lastTimeState==1?'异常':!item.lastTimeXjDate?'未巡检':'正常'}}</td>
						<!-- || $permissions.indexOf(220)  != -1 -->
						<td class="tcent" style="width: 250px;"
							v-if="$permissions.indexOf(218)  != -1 || $permissions.indexOf(264)  != -1">
							<a href="javascript:;" class="btn-green btns" @click="edit(index)"
								v-if="$permissions.indexOf(218)  != -1">编辑</a>
							<!-- 	<a href="javascript:;" class="btn-gray btns" @click="delopen(item.id)"
								v-if="$permissions.indexOf(220)  != -1">删除</a> -->
							<a href="javascript:;" class="btn-blue btns" @click="openrecord(item)"
								v-if="$permissions.indexOf(264)  != -1">巡检</a>
						</td>
					</tr>

				</table>

				<div class="page_box">
					<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
						:current-page="page" :page-sizes="[10, 30, 60, 100]" :page-size="limit"
						layout="total, sizes, prev, pager, next, jumper" :total="inglen">
					</el-pagination>
				</div>

			</div>


		</div>
		<!--新增-->
		<div :class="showadd?'modal in fade':'modal fade'" tabindex="-1" role="dialog" id="keshi"
			:style="showadd?'display: block;z-index:199;':'z-index:199;'">
			<div class="cent w600" style="justify-content: center;width: 860px !important;">
				<div class="modal-dialog" role="document" style="width: 100%;height: 562px;">
					<div class="modal-content">
						<div class="modal-header tit">
							<em></em>{{info.id?'编辑巡检单元':'新建巡检单元'}}
							<div class="right" @click="showadd=false;">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"
									style="line-height: normal;"><span class="iconfont icon-cha"
										aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100 search-cont" style="padding: 15px 27px;height: 444px;">
							<div class="sublist">
								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>名称</label>
										<div class="input-cont">
											<input type="text" class="form-control" v-model="info.name"
												placeholder="输入名称">
										</div>
									</div>

									<div class="subli_left">
										<label class="subl">巡检类型</label>
										<div class="input-cont">
											<el-select v-model="info.type" placeholder="巡检类型">
												<el-option v-for="item in zctypeadd" :key="item.id" :label="item.name"
													:value="item.id">
												</el-option>
											</el-select>
										</div>
									</div>
									<!-- <div class="subli_left">
										<label class="subl">巡检周期</label>
										<div class="input-cont">
											<el-select v-model="info.periodId" placeholder="巡检周期">
												<el-option v-for="item in zctype2add" :key="item.id" :label="item.name"
													:value="item.id">
												</el-option>
											</el-select>
										</div>
									</div> -->
								</div>
								<div class="subli">
									<div class="subli_left">
										<label class="subl">地址</label>
										<div class="input-cont">
											<input type="text" class="form-control" v-model="info.address"
												placeholder="输入名称">
										</div>
									</div>
									<div class="subli_left">
										<label class="subl">所属科室</label>
										<div class="input-cont">
											<el-autocomplete popper-class="my-autocomplete"
												@change="info.maintenanceDepartId = '';isclick1=false" v-model="dname"
												value-key="name" :fetch-suggestions="querySearch_d" placeholder="请选择内容"
												@select="handleSelect_d">
												<!-- <i class="el-icon-edit el-input__icon" slot="suffix"
															@click="handleIconClicdk">
														</i> -->
												<template slot-scope="{ item }">
													<div class="tab_tr" :title="item.name">
														<div class="tab_td" style="width: 50%;">
															{{ item.name }}
														</div>
														<div class="tab_td" style="width: 50%;">
															{{ item.address }}
														</div>
													</div>
									
												</template>
											</el-autocomplete>
											<span class="iconfont icon-list" data-toggle="modal" data-target="#keshi"
												@click="utype='add';alert_show2=!alert_show2;getrooms()"></span>
										</div>
									</div>
								</div>
								<div class="subli">
									<div class="sublia">
										<label class="subl">备注</label>
										<div class="input-cont">
											<textarea name="" v-model="info.remark" id="" style="height: 224px;"
												placeholder="请输入备注"></textarea>
											<!-- <div class="snum">{{xqinfo.xqDescription.length}}/1000</div> -->
										</div>
									</div>
								</div>
							</div>
						</div>
						<div class="modal-footer tcent">
							<button class="btn btn-primary" @click="showData">确定</button>
							<button class="btn btn-info close_eng" @click="showadd=false">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>

		<!--新增-->
		<div :class="showrecord?'modal in fade':'modal fade'" tabindex="-1" role="dialog" id="keshi"
			:style="showrecord?'display: block;z-index:199;':'z-index:199;'">
			<div class="cent w600" style="justify-content: center;width: 860px !important;">
				<div class="modal-dialog" role="document" style="width: 100%;height: 660px;">
					<div class="modal-content">
						<div class="modal-header tit">
							<em></em>添加巡检记录
							<div class="right" @click="closerecord">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"
									style="line-height: normal;"><span class="iconfont icon-cha"
										aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100 search-cont" style="padding: 15px 27px;height: 542px;">
							<div class="sublist">
								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>巡检设备名称</label>
										<div class="input-cont">
											<input type="text" class="form-control" v-model="xjname" readonly
												placeholder="输入巡检设备名称">
										</div>
									</div>
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>巡检结果</label>
										<div class="input-cont">
											<el-select v-model="info.result" placeholder="巡检结果" @change="page=1">
												<el-option v-for="item in retypeadd" :key="item.id" :label="item.name"
													:value="item.id">
												</el-option>
											</el-select>
										</div>
									</div>
								</div>
								<div class="subli">
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>巡检时间</label>
										<div class="input-cont">
											<el-date-picker prefix-icon='none' v-model="info.xjDate" type="datetime"
												value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择巡检时间">
											</el-date-picker>
										</div>
									</div>
									<div class="subli_left">
										<label class="subl"><em class="red">*</em>巡检人</label>
										<div class="input-cont">
											<el-autocomplete popper-class="my-autocomplete" :trigger-on-focus="false"
												v-model="username" value-key="realName"
												:fetch-suggestions="querySearch_xq" placeholder="请选择巡检人"
												@select="handleSelect_jl">
												<template slot-scope="{ item }">
													<div class="tab_tr">
														<div class="tab_td">{{ item.userName }}</div>
														<div class="tab_td">{{ item.realName }}</div>
														<div class="tab_td">{{ item.departName }}</div>
														<div class="tab_td">{{ item.phoneNo }}</div>
													</div>

												</template>
											</el-autocomplete>
											<span class="iconfont icon-list"
												@click="utype='add';openuseralert()"></span>
										</div>
									</div>
								</div>
								<div class="subli">
									<div class="sublia">
										<label class="subl" style="line-height: 40px;">巡检描述</label>
										<div class="input-cont">
											<textarea name="" v-model="info.remark" id=""
												placeholder="请输入巡检描述"></textarea>
											<!-- <div class="snum">{{xqinfo.xqDescription.length}}/1000</div> -->
										</div>
									</div>
								</div>
								<div class="subli">
									<div class="subli_left" style="width:100%;align-items: flex-start;">
										<label class="subl">附件信息：</label>
										<div class="task_r" style="width: 100%;">
											<el-upload class="upload-demo" ref="upload" :data="{project:'xj'}"
												:headers="{'Authorization':token}" :action="$url+'/file/upload'"
												:show-file-list="false" :file-list="fileList3"
												:before-upload="beforeUpload2" :on-success="uploadsuc3" :multiple="true"
												:auto-upload="true">
												<div class="upload_btn">
													<img src="@/assets/images/upload.png" alt="">点击上传
												</div>
											</el-upload>
											<div class="upload_list">
												<div class="up_li" v-for="item,index in files3">
													<div class="file_name">
														<div class="file_name_left"><img
																src="@/assets/images/upload.png" alt="">{{item}}
														</div>
														<div class="file_name_right">
															<div class="file_check" @click="check_file($url + item)">查看
															</div>
															<div class="file_del" @click="del_file3(index)">
																删除
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>

								<div class="httablist">
									<div class="subli">
										<div class="httitle">巡检过程</div>
									</div>
									<table style="width: 100%;">
										<tr>
											<th><i class="el-icon-circle-plus addht"
													@click="addTab(editableTabsValue)"></i>
											</th>
											<th>巡检内容</th>
											<th>状态</th>
											<th>结果</th>
											<th>说明</th>
										</tr>
										<tr v-for="item,index in arr">
											<td><i class="el-icon-remove addht" @click="removeTab(index)"></i></td>
											<td class="tcent">
												<input type="text" class="form-control" v-model="item.name"
													placeholder="输入巡检内容">
											</td>
											<td>
												<el-select v-model="item.statue" placeholder="状态"
													@change="changeselect">
													<el-option v-for="item in static" :key="item.id" :label="item.name"
														:value="item.id">
													</el-option>
												</el-select>
											</td>
											<td>
												<input type="text" class="form-control" v-model="item.value"
													placeholder="输入巡检结果">
											</td>
											<td>
												<input type="text" class="form-control" v-model="item.content"
													:placeholder="item.remark">
											</td>
										</tr>
									</table>
								</div>


							</div>
						</div>
						<div class="modal-footer tcent">
							<button class="btn btn-primary" @click="addrecord">确定</button>
							<button class="btn btn-info close_eng" @click="closerecord">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>


		<div class="alzzc" v-if="addxj">
			<div class="del_alert" style="width: 450px;height: 300px;">
				<div class="modal-header tit" style="text-align: left;">
					<em></em>巡检设置
					<div class="right" @click="closebf">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"
							style="line-height: normal;"><span class="iconfont icon-cha" aria-hidden="true"></span>
						</button>
					</div>
				</div>
				<div class="alert_info bfalert">
					<div class="bfli">
						<div class="bfli_l">巡检类型：</div>
						<div class="bfli_r">
							<div class="input-cont">
								<el-select v-model="xjinfo.typeId" placeholder="巡检类型">
									<el-option v-for="item in zctypeadd" :key="item.id" :label="item.name"
										:value="item.id">
									</el-option>
								</el-select>
							</div>
						</div>
					</div>
					<!-- <div class="bfli">
						<div class="bfli_l">巡检周期：</div>
						<div class="bfli_r">
							<div class="input-cont">
								<el-select v-model="xjinfo.periodId" placeholder="巡检周期">
									<el-option v-for="item in zctype2add" :key="item.id" :label="item.name"
										:value="item.id">
									</el-option>
								</el-select>
							</div>
						</div>
					</div> -->

				</div>
				<div class="alert_btns">
					<div class="alert_sure" @click="addins">确认</div>
					<div class="alert_close" @click="closebf">取消</div>
				</div>
			</div>
		</div>
		<div class="alzzc" v-if="delalert">
			<div class="del_alert">
				<div class="modal-header tit" style="text-align: left;">
					<em></em>信息
					<div class="right" @click="delalert=false">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"
							style="line-height: normal;"><span class="iconfont icon-cha" aria-hidden="true"></span>
						</button>
					</div>
				</div>
				<div class="alert_info">确认要删除选中的这<span>{{delnum}}</span>条数据吗？</div>
				<div class="alert_btns">
					<div class="alert_sure" @click="del">确认</div>
					<div class="alert_close" @click="delalert=false">取消</div>
				</div>
			</div>
		</div>
		<!--选择科室弹窗-->
		<div :class="alert_show2?'modal in fade':'modal fade'" tabindex="-1" role="dialog" id="keshi"
			:style="alert_show2?'display: block;z-index:200':''">
			<div class="cent w600"
				style="justify-content: center;width: 600px;height: calc(100% - 312px);margin: 156px auto;">
				<div class="modal-dialog" role="document">
					<div class="modal-content">
						<div class="modal-header tit">
							<em></em>选择科室
							<div class="right" @click="alert_show2=false;roomsearch = '';getallrooms()">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"
									style="line-height: normal;"><span class="iconfont icon-cha"
										aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100 search-cont" style="height: calc(100vh - 500px);">
							<div class="search">
								<div class="form-group" style="display: flex;padding-right: 0;">
									<input class="form-control" autocomplete="off" @keydown.enter="getallrooms"
										placeholder="输入关键字" v-model="roomsearch">

									<div style="margin-left: 10px;" class="btn btn-success" @click="getallrooms">
										<span class="iconfont icon-chaxun"
											style="line-height: 34px;vertical-align: baseline;"></span>
									</div>
								</div>
							</div>
							<div class="treelist" v-if="roomsearch">
								<div v-if="allrooms.length > 0">
									<div class="li" v-for="item in allrooms" @click="sear_choserome(item)">
										{{item.name}}
									</div>
								</div>
								<h2 class="tcent" v-else>搜索不到该内容</h2>
							</div>
							<div class="zTreeDemoBackground left"
								:style="roomsearch==''?'display:block':'display:none'">
								<ul id="treeDemo" class="ztree" @select="choseroom"></ul>
							</div>
						</div>
						<div class="modal-footer tcent">
							<button class="btn btn-primary"
								@click="alert_show2=false;roomsearch = '';getallrooms()">确定</button>
							<button class="btn btn-info"
								@click="alert_show2=false;roomsearch = '';getallrooms()">关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--报修人-->
		<div :class="user_alert?'modal in fade':'modal fade'" role="dialog"
			:style="user_alert?' align-items: center;justify-content: center;display: flex;z-index:200;':'z-index:200'"
			id="engineer">

			<div class="cent w700" style="height: 865px;max-width: 955px;max-height:calc(100vh - 50px)">

				<div class="modal-dialog" role="document">
					<div class="modal-content" style="overflow: visible;">
						<div class="modal-header tit">
							<em></em>选择用户
							<div class="right" @click="closeusertalert">
								<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
										class="iconfont icon-cha" aria-hidden="true"></span> </button>
							</div>
						</div>
						<!--表单-->
						<div class="modal-body h100"
							style="overflow-x: hidden;overflow-y:scroll;height:760px;max-height:calc(100vh - 150px)">

							<div class="left">
								<div class="zTreeDemoBackground">
									<ul id="treeDemo4" class="ztree" @select="choseroom_user"></ul>
								</div>
							</div>
							<div class="right" style="overflow: visible;">
								<div class="search">
									<!-- <form> -->
									<div class="form-group" style="display: flex;padding-right: 0;">
										<input class="form-control" autocomplete="off"
											@keydown.enter="page2=1;word_users=word_user;getalluserlist()"
											v-model="word_user" placeholder="输入关键字">
										<div style="margin-left: 10px;" class="btn btn-success"
											@click="page2=1;word_users=word_user;getalluserlist()">
											<span class="iconfont icon-chaxun"
												style="line-height: 34px;vertical-align: baseline;"></span>
										</div>
									</div>
									<!-- </form> -->
								</div>

								<div class="enr_alert_scorll">
									<div style="height: 552px;">
										<h2 class="tcent" v-if="user_all.length ==0">暂时没有数据</h2>
										<table class="table table-hover smallTab" v-else>
											<tr>
												<th></th>
												<th>账号</th>
												<th>姓名</th>
												<th>电话</th>
											</tr>
											<tr v-for="item,index in user_all">
												<td>
													<input type="radio" v-model="userid" :value="item.id"
														@change="changechose(item.id,item.realName,item.phoneNo)"
														name="chose2" :id="'c'+item.id"><label
														:for="'c'+item.id"></label>
												</td>
												<td>{{item.userName}}</td>
												<td>{{item.realName}}</td>
												<td>{{item.phoneNo}}</td>
											</tr>
										</table>
									</div>
									<div class="Spage" style="margin: 20px 0;">
										<el-pagination @current-change="handleCurrentChange2" :current-page="page2"
											style="display: flex;justify-content: center;" :pager-count="5"
											:page-size="10" :page-count="num2" layout="prev, pager, next">
										</el-pagination>
									</div>


									<div class="tcent" style="margin-bottom: 30px;">
										<button class="btn btn-primary" @click="sure_user">确定</button>&emsp;
										<button class="btn btn-default" @click="closeusertalert">关闭</button>
									</div>
								</div>


							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="loading-content" v-if="showloading">
			<div class="loading-spinner">
				<svg viewBox="25 25 50 50" class="circular">
					<circle cx="50" cy="50" r="20" fill="none" class="path"></circle>
				</svg>
			</div>
			<div class="loading-text">加载中...</div>
		</div>
	</div>
</template>

<script type="text/babel">
	import $ from 'jquery'

	export default {
		name: "",
		data() {
			return {
				zctypevalue:'',
				zctypevalues:'',
				zctypelist:[
					{
						name: '全部状态',
						id: ''
					},
					{
						name: '正常',
						id: 0
					},
					{
						name: '异常',
						id: 1
					},
					{
						name: '未巡检',
						id: 3
					},
				],
				static:[
					// {
					// 	name: '全部',
					// 	id: ''
					// },
					{
						name: '正常状态',
						id: 1
					},
					{
						name: '异常状态',
						id: 2
					},
				],
				username: sessionStorage.getItem('realName'),
				xjname:"",
				xjinfo:{},
				info:{ xjPersonId: sessionStorage.getItem('uid'),result:0 },
				page: 1,
				list: [],
				retypeadd: [],
				inglen: 0,
				limit: 10,
				num: 1,
				showrecord: false,
				isclick1: false,
				addxj: false,
				showzzc: false,
				showloading: false,
				user_alert: false,
				alert_show2: false,
				showadd: false,
				choseall: false,
				delnum:'',
				departId:'',
				departIds:'',
				delalert:false,
				names:'',
				name:"",
				uname:"",
				zcvalue:"",
				zcvalue2:"",
				zcvalues:"",
				zcvalue2s:"",
				departname:"",
				dname:"",
				utype:"",
				suserid:"",
				roomsearch:"",
				ppname:"",
				id:"",
				setting: {
					treeId: 'id',
					data: {
						key: {
							name: 'name'
						}
					},
					callback: {
						onClick: this.choseroom
					}
				},
				zNodes: [],
				zctype: [],
				zctype2: [],
				zctypeadd: [],
				zctype2add: [],
				user_all: [],
				zNodes_u: [],
				ztree_obj_u: {},
				treeClickCount4: 0,
				treeClickCount: 0,
				setting_u: {
					treeId: 'id',
					data: {
						key: {
							name: 'name'
						}
					},
					callback: {
						onClick: this.choseroom_user
					}
				},
				word_user:"",
				word_users:"",
				page2: 1,
				num2: 1,
				inglen2: 0,
				limit2: 10,
				ids:"",
				arr:[],
				fileList3:[],
				files3id:[],
				files3:[],
				tabIndex:0,
				editableTabsValue:1,
				token: sessionStorage.getItem('token')
			}
		},
		components: {},
		mounted() {
			this.getlist();
			this.gettype();
			this.gettype2();
			this.getretype();
			this.getallrooms();
			this.getrooms();
		},
		beforeRouteEnter(to, from, next) { //路由导航钩子，通过页面路由标记是否需要清空页面数据重新加载
		    to.meta['fromPath'] = from.path;
			to.meta['needFresh'] = false;
		    
		    next();
		  },
		activated(){
			
		},
		watch:{
			roomsearch:{
					handler(newValue,oldValue){
					if(newValue == ''){
						
					}else{
						this.getallrooms();
					}
				}
			},
		},
		methods: {
			changeselect(){
				var a = 0
				for (var i = 0; i < this.arr.length; i++) {
					if(this.arr[i].statue == 2){
						this.info.result = 1
					}else{
						a++
					}
				}
				if(a == this.arr.length){
					this.info.result = 0
				}
				this.$forceUpdate()
			},
			closerecord(){
				this.showrecord=false;
				this.info = {xjPersonId: sessionStorage.getItem('uid'),result:0}
				this.username = sessionStorage.getItem('realName')
				this.fileList3 = []
				this.files3id = []
				this.files3 = []
				this.arr = []
				
			},
			openrecord(item){
				this.showrecord=true
				this.info = {xjPersonId: sessionStorage.getItem('uid'),result:0}
				this.username = sessionStorage.getItem('realName')
				this.info.nameId = item.id
				this.xjname = item.name
				var param = {typeId:item.type}
				var that = this
				this.$http.post(this.$url + '/xj/type/work/select', this.$qs.stringify(param))
					.then(function(response) {
						console.log(response)
						that.arr = response.data.data
						for (var i = 0; i < that.arr.length; i++) {
							that.arr[i].statue = that.arr[i].statue ?that.arr[i].statue :1
							
							if(that.arr[i].statue == 2){
								that.info.result = 1
							}
						}
						
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			addTab(targetName) {
			        let newTabName = this.tabIndex++;
			        this.arr.push({
			         "id" : '',
			         "statue" : 1,
			         "value" : '',
			         "name" : "",
			         "content" : "",
			         "remark" : "",
			        });
					// this.tabIndex++
					console.log(newTabName)
			        this.editableTabsValue = newTabName;
			},
			removeTab(i) {
			       this.arr.splice(i,1)
			        // this.editableTabsValue = activeName;
			        // this.buy = tabs.filter(tab => tab.name !== targetName);
			},
			uploadsuc3(file, fileList){
				if(file.code != 0){
					this.$Toast(file.msg)
					this.showloading=false
					return
				}
				 this.files3.push(file.data.relativePath)
				 this.files3id.push(file.data.id)
				 this.showloading=false
			
			},
			check_file(url){
					   window.open(url, '_blank');
			},
			beforeUpload2(e){
				this.showloading=true
				const fd = new FormData();
				 fd.append("file", e);
				 fd.append("project", 'xj');
				 fd.append("secret", this.$md5(e.name + 'gd' + e.size));
				
				var that = this
				this.$http.post(this.$url + '/file/upload', fd, {
						headers: {
							'Content-Type': 'multipart/form-data; boundary=something'
						}
					})
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						if(response.data.code != 0){
							that.$Toast(response.data.msg)
							that.showloading=false
							return
						}
						that.files3.push(response.data.data.relativePath)
						that.files3id.push(response.data.data.id)
						that.showloading=false
					})
					.catch(function(error) {
						console.log(error);
					});
					
				return false
			},
			del_file3(i){
				var that = this
				var param = {fileId:this.files3id[i]}
				this.$http.post(this.$url + '/main/delete/file', this.$qs.stringify(param))
					.then(function(response) {
						console.log(response)
							that.files3.splice(i,1)
							that.files3id.splice(i,1)
						that.fileList3.splice(i,1)
						
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			
			// 表单提交
			addrecord() {		
				console.log(this.info.result)
				if (this.info.nameId == '' ||this.info.result==undefined|| !this.info.xjPersonId || !this.info.xjDate) {
					this.$Toast("请填写必填项");
					return
				}
				this.info.fileIds = this.files3id.length>0?this.files3id.join(','):''
				for (var i = 0; i < this.arr.length; i++) {
					this.arr[i].remark = this.arr[i].content?this.arr[i].content:''
				}
				this.info.works = this.arr
				this.info.type = 1
				// var param = this.info
				this.showloading = true
				var that = this
				this.$http.post(this.$url + '/xj/record/save', this.info, {headers: {'content-type': 'application/json'}})
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg);
						that.showrecord = false
						that.showloading = false
						that.info = {}
						that.username = ''
						that.fileList3 = []
						that.files3id = []
						that.files3 = []
						that.arr = []
						that.getlist()
					})
					.catch(function(error) {
						that.$Toast('网络拥堵，刷新一下');
					});
				
			},
			closebf(){
				for (var i = 0; i < this.list.length; i++) {
					this.list[i].chosesf = false
				}
				this.ids = ''
				this.addxj=false
			},
			querySearch_d(queryString, cb) {
				var that = this
				var url = encodeURI(this.$url + '/sys/dept/select?name='+this.roomsearch)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.allrooms = response.data.data
						var restaurants_d = that.allrooms;
						var results = queryString ? restaurants_d.filter(that.createFilter_d(queryString)) : restaurants_d;
						// 调用 callback 返回建议列表的数据
						if(results.length == 0){
							results.unshift({name:"暂无内容",address:""})
						}else{
							if(results[0].id){
								results.unshift({name:"科室",address:"地址"})
							}
						}
						
						cb(results);
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			   
			},
			createFilter_d(queryString) {
				return (restaurant) => {
					// console.log(restaurant.name)
					return (restaurant.name.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
					
				};
			},
			handleSelect_d(item) {
				if(!item.id){
					this.dname=''
					return 
				}
				this.dname = item.name
				this.info.maintenanceDepartId = item.id
				// this.info.area = item.address
				this.isclick1=true
				
			},
			inspection(id){
				if(id > 0){
					this.ids = id
					this.delnum = 1
					this.addxj=true
				}else{
					var ids=''
					var num = 0
					for (var i = 0; i < this.list.length; i++) {
						if(this.list[i].chosesf==true){
							ids = ids+''+this.list[i].id+','
							num++
						}
					}
					this.ids = ids.substring(0,ids.length-1)
					if(this.ids==''){
						this.$Toast('暂无选中');
						return
					}
					this.delnum = num
					this.addxj=true
				}
			},
			addins(){
				var that = this
				this.xjinfo.ids = this.ids
				this.$http.post(this.$url + '/xj/unit/batch/update', this.$qs.stringify(this.xjinfo))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg);
						that.page=1
						that.delnum=0
						that.xjinfo={}
						that.ids=''
						that.addxj=false
						that.choseall=false
						that.getlist()
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
							
			},
			changechose(id,name,tel){
				if(this.utype == 'search'){
					this.uname = name
					this.suserid = id
				}else if(this.utype == 'add'){
					this.username = name
					this.info.xjPersonId = id
				}
			},
			sure_user(){
				
				this.user_alert = false
			},
			handleCurrentChange2(val) {
				this.page2 = val
				this.getalluserlist()
			},
			closeusertalert(){
				this.user_alert = false
				this.username = ''
				this.$forceUpdate()
				this.word_user = ''
				this.did = ''
				this.userid = ''
				this.ztree_obj_u.cancelSelectedNode();
				this.getrooms()
				this.getalluserlist()
			},
			openuseralert(){
				this.page2 = 1
				this.username = ''
				this.word_user = ''
				this.did = ''
				this.userid = ''
				this.ztree_obj_u.cancelSelectedNode();
				this.getrooms()
				this.getalluserlist()
				this.user_alert = true
			},
			querySearch_xq(queryString, cb) {
				var that = this
				var name =  this.username?this.username:''
				var url = encodeURI(this.$url + '/sys/user/select?realName='+name)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.restaurants_xq = response.data.data
						that.restaurants_xq.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
						var restaurants_xq = that.restaurants_xq;
						var results = queryString ? restaurants_xq.filter(that.createFilter_xq(queryString)) : restaurants_xq;
						// 调用 callback 返回建议列表的数据
						if(results.length == 0){
							results.unshift({userName:"暂无内容",realName:"",departName:"",phoneNo:""})
						}else{
							if(results[0].id){
								results.unshift({userName:"账号",realName:"姓名",departName:"科室",phoneNo:"电话"})
							}
						}
						
						cb(results);
						// console.log(that.restaurants)
					})
					.catch(function(error) {
						console.log(error);						
						that.$Toast('网络拥堵，刷新一下');
					});
					
			  
			},
			createFilter_xq(queryString) {
				return (restaurant) => {
					// if(restaurant.realName){
						return (restaurant.realName.toLowerCase().indexOf(queryString.toLowerCase()) != -1);
					// }
				};
			},
			handleSelect_jl(item) {
				this.username = item.realName
				this.info.xjPersonId = item.id
				// this.did = item.id				
			},
			// 获取弹窗里的用户
			getalluserlist() {
				this.choseall2 = false
				
				var id = this.did?this.did:''
				var that = this
				var url = encodeURI(this.$url + '/sys/user/list?page='+this.page2+'&limit='+this.limit2+'&deptId='+id+'&userName='+this.word_users)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.user_all = response.data.data.records
						that.cuserlist = response.data.data.records
						for (var i = 0; i < that.user_all.length; i++) {
							that.user_all[i].id = window.atob(that.user_all[i].id)
							that.cuserlist[i].id = that.user_all[i].id
						}
						if(that.utype == 'addsp'){
							var a = 0
							for (var i = 0; i < that.cuserlist.length; i++) {
								console.log(that.user_c.indexOf(that.cuserlist[i].id))
								if(that.user_c.indexOf(that.cuserlist[i].id) > -1){
									a++
									that.cuserlist[i].chosesf = true
								}else{
									that.cuserlist[i].chosesf = false
								}
							}
							
						}else if(that.utype == 'addcs'){
							var a = 0
							for (var i = 0; i < that.cuserlist.length; i++) {
								if(that.user_c2.indexOf(that.cuserlist[i].id) > -1){
									a++
									that.cuserlist[i].chosesf = true
								}else{
									that.cuserlist[i].chosesf = false
								}
							}
						}
						if(a == that.cuserlist.length){
							that.choseall2=true
						}else{
							that.choseall2=false
						}
						that.inglen2 = response.data.data.total
						if (that.inglen2 > that.limit2) {
							that.num2 = response.data.data.pages
						} else {
							that.num2 = 1
						}
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
					});
			},
			// 科室树状图选择
			choseroom_user(data, node, treeNode) {
				this.treeClickCount4++;
				if (this.treeClickCount4 >= 2) {
					return;
				}
				this.timer = window.setTimeout(() => {
					if (this.treeClickCount4 == 1) {
						this.treeClickCount4 = 0;
						console.log('单击事件,可在此处理对应逻辑')
							
								this.did = treeNode.id
							this.page2=1
							this.getalluserlist()
						
					} else if (this.treeClickCount4 > 1) {
						this.treeClickCount4 = 0;
						
						this.ztree_obj_u.cancelSelectedNode();
						console.log('双击事件,可在此处理对应逻辑')
					}
				}, 300);
			},
			// 获取全部科室
			getallrooms() {
				var that = this
				var url = encodeURI(this.$url + '/sys/dept/select?name=' + this.roomsearch)
				this.$http.get(url)
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.allrooms = response.data.data
						that.$forceUpdate()
					})
					.catch(function(error) {
						console.log(error);
					});
			},
			// 获取科室
			getrooms() {
				var param = {
					parentId: 0
				}
				var that = this
				this.$http.post(this.$url + '/sys/dept/tree', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						
						that.zNodes = response.data.data
						that.ztree_obj = $.fn.zTree.init($("#treeDemo"), that.setting, that.zNodes);
						var  nodes = that.ztree_obj.getNodes();
						for  ( var  i = 0; i < nodes.length; i++) {  //设置节点展开
						    that.ztree_obj.expandNode(nodes[i],  true ,  false ,  true );
						}
						that.zNodes_u = response.data.data
						that.ztree_obj_u = $.fn.zTree.init($("#treeDemo4"), that.setting_u, that.zNodes_u);
						 var  nodes = that.ztree_obj_u.getNodes();
						for  ( var  i = 0; i < nodes.length; i++) {  //设置节点展开
						    that.ztree_obj_u.expandNode(nodes[i],  true ,  false ,  true );
						}
					})
					.catch(function(error) {
						console.log(error);
						
						that.$Toast('网络拥堵，刷新一下');
					});
			
			},
			
			// 科室树状图选择
			choseroom(data, node, treeNode) {
				this.treeClickCount++;
				if (this.treeClickCount >= 2) {
					return;
				}
				this.timer = window.setTimeout(() => {
					if (this.treeClickCount == 1) {
						this.treeClickCount = 0;
						console.log('单击事件,可在此处理对应逻辑')
						if(this.utype == 'search'){
							this.departId = treeNode.id
							this.departname = treeNode.name
						}else{
							this.info.maintenanceDepartId = treeNode.id
							this.dname=treeNode.name
							// this.info.area = treeNode.address
						}
						
					} else if (this.treeClickCount > 1) {
						this.treeClickCount = 0;
						console.log('双击事件,可在此处理对应逻辑')
					}
				}, 300);
			},
			sear_choserome(item) {
				if(this.utype == 'search'){
					this.departname=item.name
					this.departId=item.id
				}else{
					this.info.maintenanceDepartId=item.id
					this.dname=item.name
					// this.info.address = item.address
				}
				
				this.roomsearch=item.name
				this.getallrooms()
				// this.departId = item.id
				// this.departname = item.name
			},
			changeall(){
				if(this.choseall){
					for (var i = 0; i < this.list.length; i++) {
						this.list[i].chosesf = true
					}
				}else{
					for (var i = 0; i < this.list.length; i++) {
						this.list[i].chosesf = false
					}
				}
			},
			chosechange(){
				for (var i = 0; i < this.list.length; i++) {
					if(this.list[i].chosesf == true){
						this.choseall=true
					}else{
						this.choseall=false
						break
					}
					
				}
			},
			search(){
				this.names = this.name
				this.zctypevalues = this.zctypevalue
				this.zcvalues = this.zcvalue
				this.zcvalue2s = this.zcvalue2
				this.departIds = this.departId
				this.page = 1
				this.getlist()
			},
			
			closealert(){
				
			},
			delopen(id){
				if(id > 0){
					this.ids = id
					this.delnum = 1
					this.delalert=true
				}else{
					var ids=''
					var num = 0
					for (var i = 0; i < this.list.length; i++) {
						if(this.list[i].chosesf==true){
							ids = ids+''+this.list[i].id+','
							num++
						}
					}
					this.ids = ids.substring(0,ids.length-1)
					if(this.ids==''){
						this.$Toast('暂无选中');
						return
					}
					this.delnum = num
					this.delalert=true
				}
			},
			// 删除
			del(){
				
				this.delalert=false
				var param = {
					ids:this.ids
				}
				var that = this
				this.$http.post(this.$url + '/xj/unit/delete', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg);
						that.page=1
						that.getlist()
						
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},

			openadd(){
				this.showadd=true
				this.info = {}
				this.dname=''
				this.type = 'add'
			},
			
			edit(index){
				this.id = this.list[index].id
				var param = {
					id:this.id
				}
				var that = this
				this.$http.post(this.$url + '/xj/unit/selectOne', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.info = {
							id:response.data.data.id,
							name:response.data.data.name,
							remark:response.data.data.remark,
							address:response.data.data.address,
							periodId:response.data.data.periodId,
							type:response.data.data.type,
						}
						that.dname = response.data.data.maintenanceDepart
						that.$forceUpdate()
						that.showadd = true
						
						
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			},
			
			closeadd(){
				this.showadd = false;
				
				this.ppname =  ''
				this.id =  ''
			},
			
			 handleSizeChange(val) {
				this.limit = val
				this.choseall = false
				this.getlist()
			},
			handleCurrentChange(val) {
				this.page = val
				this.choseall = false
				this.getlist()
			},
			
			// 表单提交
			showData() {				
				if (this.info.name.trim() == '') {
					this.$Toast("请填写巡检单元名称");
					return
				}
				
				// var param = {
				// 	id:this.id,
				// 	name:this.ppname
				// }
				this.showloading = true
				var that = this
				this.$http.post(this.$url + '/xj/unit/save', this.$qs.stringify(this.info))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.$Toast(response.data.msg);
						that.showadd = false
						that.showloading = false
						that.info = {}
						that.id = ''
						that.getlist()
					})
					.catch(function(error) {
						that.$Toast('网络拥堵，刷新一下');
					});
				
			},
			
			// 点击遮罩层
			close(){
				this.options_show=false
				this.showzzc=false
				this.showinfo=false
			},
			gettype() {
				var that = this
				this.$http.post(this.$url + '/xj/type/list')
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						if(response.data.data.length > 0){
							that.zctype = response.data.data
							that.zctype.unshift({'name':'全部类型',id:''})
							
							that.zctypeadd =response.data.data
							if(that.zctypeadd[0].name == '全部类型'){
								that.zctypeadd = that.zctypeadd.slice(1)
							}
							// console.log(response.data.data)
						}
						
						that.$forceUpdate()
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
						that.$Toast('网络拥堵，刷新一下');
					});
			
			},
			gettype2() {
				var that = this
				this.$http.get(this.$url + '/xj/period/selectList')
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						
						that.zctype2 = response.data.data
						that.zctype2.unshift({'name':'全部周期',id:''})
						
						that.zctype2add =response.data.data
						if(that.zctype2add[0].name == '全部周期'){
							that.zctype2add = that.zctype2add.slice(1)
						}
						// console.log(response.data.data)
						that.$forceUpdate()
					})
					.catch(function(error) {
						console.log(error);
						that.$Toast('网络拥堵，刷新一下');
					});
			
			},
			getretype() {
				var that = this
				this.$http.get(this.$url + '/xj/record/resultSelect')
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						
						
						that.retypeadd =response.data.data
						
						that.$forceUpdate()
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
						that.$Toast('网络拥堵，刷新一下');
					});
			
			},
			getlist() {
				this.showloading = true
				var that = this
				var param = {
					page:this.page,
					limit:this.limit,
					name:this.names,
					type:this.zcvalues,
					maintenanceDepartId:this.departIds,
					lastTimeState:this.zctypevalues,
					periodId:this.zcvalue2s,
				}
				this.$http.post(this.$url + '/xj/unit/select', this.$qs.stringify(param))
					.then(function(response) {
						if (response.data.code == '1410') {
							that.$Toast(response.data.msg);
							sessionStorage.setItem('token', '')
							that.$router.push('/login')
							return
						}
						that.list = response.data.data
						that.inglen = response.data.count
						for (var i = 0; i < that.list.length; i++) {
							that.list[i].chosesf = false
						}
						that.choseall = false
						that.$forceUpdate()
						that.showloading = false
					})
					.catch(function(error) {
						console.log(error);
						// sessionStorage.setItem('token','undefined')
						// that.$router.push('/login')
						that.$Toast('网络拥堵，刷新一下');
					});

			},
		},

		computed: {},
	}
</script>
<style lang='less' scoped>
	.flb {
		align-items: flex-start;
	}

	.sear_btns {
		white-space: nowrap;
	}

	.httitle {
		font-size: 16px;
		font-weight: bold;
	}

	.bfli {
		display: flex;
		padding: 0 30px;
		margin-bottom: 20px;
		line-height: 40px;
	}

	.bfli .el-select {
		width: 271px;
		margin-left: 0;
	}

	.bfalert {
		height: 130px;
		overflow-y: auto;
		overflow-x: hidden;
	}

	.bfli_r {
		display: flex;
		flex-wrap: wrap;
		width: 600px;
		position: relative;
	}

	.bfli_l {
		width: 200px;
	}

	.alert_btns {
		margin-top: 20px;
	}

	.title {
		font-size: 24px;
		color: #000000;
	}

	.alert_info textarea {
		width: 100%;
		background: #FFFFFF;
		border: 1px solid #CCCCCC;
		box-shadow: 0px 2px 0px 0px #EEEEEE;
		border-radius: 5px;
		padding: 5px 10px;
		outline: none;
		margin-top: 10px;
		margin-bottom: -10px;
	}

	.input-cont:hover .clears {
		display: block;
	}

	.clears {
		width: 10px;
		position: absolute;
		right: 35px;
		top: 14px;
		display: none;
		cursor: pointer;
	}

	.sublia {
		display: flex;

	}

	.subli textarea {
		width: 673px;
		height: 100px;
		background: #FFFFFF;
		border: 1px solid #CCCCCC;
		box-shadow: 0px 2px 0px 0px #EEEEEE;
		border-radius: 5px;
		outline: none;
		padding: 10px 10px;
		line-height: 20px;
	}

	.subli /deep/ .el-date-editor--date .el-input__inner,
	.subli /deep/ .el-date-editor.el-input,
	.el-date-editor.el-input__inner {
		width: 271px !important;
	}

	.subl {
		width: 100px;
		text-align: right;
		margin-right: 17px;
	}

	.subli /deep/ .el-input__prefix,
	.task_r /deep/ .el-input__prefix {
		right: 5px;
		left: auto;
		width: 25px;
	}

	.subli input,
	.subli .el-select {
		width: 271px;
		margin-left: 0;
	}

	.subli /deep/ .el-input__inner {
		height: 34px;
	}

	.subli label {
		margin-bottom: 0;
	}

	.sublist {
		padding-top: 15px;
	}

	.subli_left {
		display: flex;
		align-items: center;
		width: 50%;
	}

	.subli {
		display: flex;
		align-items: center;
		color: #000;
		margin-bottom: 15px;
		justify-content: space-between;
	}

	/deep/ .el-pagination .btn-prev {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	/deep/ .el-pagination .btn-next {
		border: 1px solid #ccc;
		padding: 0;
		border-left: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	/deep/ .el-pager li {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		line-height: 33px;
	}

	/deep/ .el-pager li:nth-last-of-type(1) {
		border-right: 1px solid #ccc;
	}

	/deep/ .el-pager li.active {
		border: #4286f5 1px solid;
		background: #4286f5;
		color: #fff;
	}

	/deep/ .el-input--prefix .el-input__inner {
		height: 34px;
		padding: 0 8px;
	}

	/deep/ .el-date-editor--date .el-input__inner {
		width: 150px !important;
	}

	.search_box /deep/ .el-input__inner {
		width: 117px;
		height: 34px;
		/* background: #F6F6F6; */
		border: 1px solid #CCCCCC;
		/* box-shadow: 0px 2px 0px 0px #EEEEEE; */
		border-radius: 5px;

	}

	/deep/ .el-input__icon {
		line-height: 34px;
	}


	.el-select {
		margin-left: 10px;
	}

	.search_box {
		/* margin-bottom: 20px; */
	}

	.search_box .el-select {
		margin-bottom: 20px;
	}

	.form-group .el-select {
		margin-left: 0px
	}

	.el-input__icon {
		line-height: 34px;
	}

	.el-input__inner {
		height: 34px;
		width: 110px;
		/* margin-left: 10px; */
	}

	.el-upload__input {
		bottom: 35px;
	}

	.btns {
		min-width: 72px;
		padding: 0 8px !important;
		width: auto !important;
	}

	.modal-lg .modal-body.h100 {
		height: calc(100vh - 130px);
	}

	.el-input--prefix .el-input__inner {
		padding-left: 12px;
		padding-right: 12px;
	}

	.search_inp {
		/* width: 260px; */
		width: 160px;
		margin-left: 10px;
		margin-bottom: 20px;
	}

	.mb0,
	.mb0 .form-group {
		margin-bottom: 15px;
	}


	.btn-primary:hover {
		color: #fff !important;
		background: #4286f5 !important;
		border: none;
	}

	.btn-primary {
		outline: none !important;
		color: #fff !important;
		background: #4286f5 !important;
		margin-right: 18px;
	}

	.close_eng:hover {
		color: #434343 !important;
		background: #EEEEEE !important;
		border: none;
	}

	.close_eng {
		border: none;
		color: #434343 !important;
		background: #EEEEEE !important;
		outline: none !important;
	}

	.el-autocomplete {
		width: 271px;
	}

	.el-autocomplete-suggestion li.highlighted,
	.el-autocomplete-suggestion li:hover {
		background-color: #ddd;
	}

	.el-popper {
		margin-top: 0;
		margin-right: 0;
	}



	.my-autocomplete {
		border-radius: 0 0 6px 6px;
		min-width: 400px;
		margin-top: 0 !important;


		.popper__arrow {
			display: none;
		}

		.el-scrollbar__wrap {
			padding: 0 !important;
			overflow-x: scroll;

			li {
				padding: 0 !important;
				min-width: 320px;
			}

		}

	}


	.el-scrollbar__wrap {
		-ms-overflow-style: none !important;
	}

	.el-scrollbar__wrap::-webkit-scrollbar {
		display: none;
	}


	.container /deep/ tr td:nth-of-type(2) span {
		color: #22ac38;
	}

	.el-pagination__total {
		height: 33px !important;
		line-height: 33px !important;
	}

	.el-input--mini .el-input__inner {
		height: 33px;
	}

	.el-pagination__editor.el-input .el-input__inner {
		height: 33px;
	}

	.page_box {
		display: flex;
		justify-content: flex-end;
		margin-top: 30px;
	}

	.el-pagination .btn-prev {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	.el-pagination .btn-next {
		border: 1px solid #ccc;
		padding: 0;
		border-left: none;
		min-width: 33px;
		height: 33px;
		padding-top: 2px;
	}

	.el-pager li {
		border: 1px solid #ccc;
		padding: 0;
		border-right: none;
		min-width: 33px;
		height: 33px;
		line-height: 33px;
	}

	.el-pager li:nth-last-of-type(1) {
		border-right: 1px solid #ccc;
	}

	.el-pager li.active {
		border: #4286f5 1px solid;
		background: #4286f5;
		color: #fff;
	}

	.btns {
		width: 72px;
		padding: 0;
	}

	.zzc {
		width: 100vw;
		height: 100vh;
		position: fixed;
		top: 0;
		left: 0;
	}


	.loading-content {
		position: absolute;
		z-index: 2000;
		/* background-color: rgba(0, 0, 0, 0.8); */
		margin: 0;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		transition: opacity 0.3s;
		display: flex;
		justify-content: center;
		align-items: center;
		flex-direction: column;
		/* width: 200px;
		height: 150px;
		border-radius: 10px; */
	}

	.loading-spinner {
		text-align: center;
	}

	.loading-spinner .circular {
		height: 42px;
		animation: loading-rotate 2s linear infinite;
	}

	.loading-spinner .path {
		animation: loading-dash 1.5s ease-in-out infinite;
		stroke-dasharray: 90, 150;
		stroke-dashoffset: 0;
		/* stroke- 2; */
		stroke: #000;
		stroke-linecap: round;
	}

	.loading-text {
		font-size: 14px;
		color: #000;
	}

	@keyframes loading-rotate {
		100% {
			transform: rotate(360deg);
		}
	}

	@keyframes loading-dash {
		0% {
			stroke-dasharray: 1, 200;
			stroke-dashoffset: 0;
		}

		50% {
			stroke-dasharray: 90, 150;
			stroke-dashoffset: -40px;
		}

		to {
			stroke-dasharray: 90, 150;
			stroke-dashoffset: -120px;
		}
	}



	.btns .iconfont {
		font-size: 10px;
		transition: all .3s;
		transform: rotateZ(0deg);
		line-height: 26px;
	}



	td,
	th {
		font-size: 14px;
		color: #333;
		/* line-height: 22px; */
		padding: 10px;
		border-top: 0;
		border-bottom: 1px solid #eee;
	}



	.modal {
		position: absolute;
	}

	.modal-dialog {
		height: 97%;
	}

	.modal-header {
		position: sticky;
		top: 0;
		z-index: 50;
	}

	.modal-content {
		/* width: 85%; */
		margin: 0 auto;
		max-height: 100%;
		/* height: 65vh; */
		/* overflow-y: scroll; */
	}

	.cent {
		width: 100%;
		align-items: center;
	}
</style>
